﻿using lwzlz.Application.System;
using lzwlz.Web;
using System;
using System.Web.Mvc;

namespace lwzlz.Web.Areas.Study.Controllers
{
    public class FontController : StudyController
    {
        #region 界面
        /// <summary>
        /// 详情
        /// </summary>
        /// <returns></returns>
        public ActionResult Detail(string id)
        {
            try
            {
                var user = StudyStudentLogin.GetCurrentUser();
                if (user != null)
                {
                    var idStr = new Common.Symmetric().Decrypto(id);
                    var font = new FontService().Get(int.Parse(idStr));
                    return View(font);
                }
                else
                {
                    return Redirect(Url.Action("PassWordLogin", "Login"));
                }
            }
            catch (Exception ex)
            {
                return Content(ex.Message);
            }
        }
        #endregion
    }
}